#pragma once

#include "VisioCommon.h"

class CGLProgram
{
public:
	CGLProgram(char* vsShaderFileName, char* psShaderFileName);

	HRESULT CreateVertexShader(char* vsShaderFileName);
	HRESULT CreateFragmentShader(char* fragShaderFileName);
	HRESULT LoadShaderProgramFromFile(char* FileName, GLchar** ShaderSource, GLint& len);

	template<DWORD ShaderType> 
	GLuint& GetShaderObject();

	template<DWORD ShaderType> 
	HRESULT CreateShaderProgramCommon(char* fileName);

	inline GLuint GetProgramObject() {return m_ShaderProgram;}
private:
	GLuint m_ShaderProgram;
	GLuint m_VS;
	GLuint m_FS;
};